//在光标处插入字符
(function($){
    $elem_a = $('<a id="count" data-toggle="tooltip" data-placement="top" title="伤害收益计算"></a>')
    $('#fastposteditor .fpd').append($elem_a)
    $elem_a.click(function(event) {
      uploadPlugin()
    });
  
  
    $('[data-toggle="tooltip"]').tooltip()
  })(jQuery);

function uploadPlugin() {
    father = document.querySelector('#fastposteditor')
    plugin = document.createElement('iframe');
    father.appendChild(plugin);
    father.style.position = 'relative'
    plugin.id = 'plugin';
    plugin.style.position = 'absolute';
    plugin.style.width = '500px';
    plugin.style.height= '485px';
    plugin.style.bottom = '145px';
    plugin.style.left = '145px';
    plugin.style.zIndex = 999998;
    plugin.style.border = '0';
    plugin.scrolling = 'no';
    plugin.src = chrome.extension.getURL("iframe.html");
}